package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpFaUserDataDao;
import com.financing.platform.dto.FpFaUserDataDTO;
import com.financing.platform.util.SqlName;
/**
 * fp_fa_user_data  
 * shop人员信息表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaUserDataDao")
public class FpFaUserDataDaoImpl extends BaseDaoImpl implements IFpFaUserDataDao {


	@Override
	public int insert(FpFaUserDataDTO fpFaUserData) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpFaUserDataSql.insert, fpFaUserData);
	}

	@Override
	public void update(FpFaUserDataDTO fpFaUserData) throws SQLException {
		this.sqlMapClient.update(SqlName.FpFaUserDataSql.update, fpFaUserData);
	}

	@Override
	public void updateForce(FpFaUserDataDTO fpFaUserData) throws SQLException {
		this.sqlMapClient.update(SqlName.FpFaUserDataSql.updateForce, fpFaUserData);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpFaUserDataSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpFaUserDataDTO> queryList(FpFaUserDataDTO fpFaUserData) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpFaUserDataSql.queryList, fpFaUserData);
	}

	@Override
	public int queryListCount(FpFaUserDataDTO fpFaUserData) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpFaUserDataSql.queryListCount, fpFaUserData);
	}

	@Override
	public FpFaUserDataDTO loadById(Integer id) throws SQLException {
		return  (FpFaUserDataDTO)this.sqlMapClient.queryForObject(SqlName.FpFaUserDataSql.loadById,id);
	}

	
 	
}
